Skip to content

Add fully-assembled self-host e2e suite (first scenario: org setup) - #879

Closed
RhysSullivan wants to merge 1 commit into
mainfrom
test/selfhost-e2e-org-setup
Closed

Add fully-assembled self-host e2e suite (first scenario: org setup)#879
RhysSullivan wants to merge 1 commit into
mainfrom
test/selfhost-e2e-org-setup

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

Seeds a realistic, fully-assembled end-to-end suite for the self-host app.

What it does: boots the real production server (bun src/serve.ts — built SPA + typed API + Better Auth + MCP) against a throwaway data dir and drives it in a real browser through its real surfaces. The bugs worth catching live in the assembly (frontend ↔ API ↔ auth ↔ DB), which only a fully-assembled run sees — request-level tests can't.

First scenario — org-setup.spec.ts: a zero-config first run sets up an org. The browser fills the setup form, real Better Auth signup runs, and the org + owner are confirmed via the same API the signed-in console calls. Any broken seam turns it red.

Hermetic: in-process Better Auth + libSQL — no external services, no secrets, runnable in CI. A fresh data dir per run guarantees the first-run state.

Watchable:

  • bun run test:e2e:watch — headed + slowed, watch each step live
  • bun run test:e2e:ui — Playwright time-travel UI
  • every run writes an HTML report + a trace (playwright show-trace)

Designed to grow: scenarios talk to the app only through a SelfHostApp fixture handle — never internals — so they read like user journeys and that handle is the seam where other host drivers (cloud, cloudflare) get swapped in later while the scenarios stay identical.

Not wired into the CI gate yet (separate test:e2e script) pending a flakiness read.

Boots the real prod self-host server (bun src/serve.ts: built SPA + typed API +
Better Auth + MCP) against a throwaway data dir and drives it in a real browser
through its real surfaces — the seed of a realistic, host-parametric e2e suite.

First scenario: a zero-config first run sets up an org. The browser fills the
setup form, real Better Auth signup runs, and the org + owner are confirmed via
the same API the signed-in console calls — so any broken seam between frontend,
auth, API, and DB turns it red.

Hermetic (in-process Better Auth + libSQL — no external services or secrets) and
watchable: test:e2e:watch (headed + slowed), test:e2e:ui (time-travel UI), plus
an HTML report + trace on every run. Fixtures keep the scenario reading as a user
journey behind a SelfHostApp handle that is also the future host-driver seam.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 2, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing 4a29fbe Commit Preview URL

Branch Preview URL
Jun 02 2026, 04:24 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 2, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud 4a29fbe Jun 02 2026, 04:26 AM

@RhysSullivan
RhysSullivan deleted the test/selfhost-e2e-org-setup branch June 2, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant